<?php
session_start();
require_once '../models/Product.php';
$seriesID=$_REQUEST['seriesID'];
$rows=Product::getInfoProduct_series($seriesID);
?>
<!DOCTYPE html>
<html>
<head>
<title>Add Product Detail</title>
<?php include '../admin/_meta.php';?>
</head>
<body>
<div id="firstLine">
		<div id="top-bar">
		<?php include '_top_bar_admin.php';?>
		</div>
	</div>
	<div id="container">
		<div id="header">
			<?php include '_menu_admin.php';?>
		</div>
		<div id="center">
			<div id="table-user">

				<table id="table-admin">
					<tr>
						<td colspan="2"><b>Add Product Detail</b></td>
						<td><input type="hidden" name="productID" id="productID" value="<?php echo $rows['productID']?>"></td>
					</tr>
					<tr>
						<td>Product Name:</td>
						<td><input type="text" name="" class="input_text_w300_h30" id="" value="<?php echo $rows['brandName'].' '.$rows['modelName'].' '.$rows['seriesName']?>" disabled=disabled></td>
					</tr>
					<tr>
						<td>Screen:</td>
						<td><input type="text" class="input_text_w300_h30" name="screen" id="screen"></td>
					</tr>
					<tr>
						<td>CPU:</td>
						<td><input type="text" class="input_text_w300_h30" name="cpu" id="cpu"></td>
					</tr>
					<tr>
						<td>Ram:</td>
						<td><input type="text" class="input_text_w300_h30" name="ram" id="ram"></td>
						
					</tr>
					<tr>
						<td>OS:</td>
						<td><select name="os" id="os" class="input_text_w300_h30">
						<?php

						if($rows['os']=="Android"){
						echo "<option value='Android'>Android</option>";
						echo "<option value='Windows Phone'>Windows Phone</option>";
						}else {
						echo 	"<option value='Windows Phone'>Windows Phone</option>";
						echo	"<option value='Android'>Android</option>";
						}
						echo $rows['sim'];
						?>
						</select>
						</td>
					</tr>
					<tr>
						<td>Sim:</td>
						<td><select name="sim" id="sim" class="input_text_w300_h30">
						<?php

						if($rows['sim']=="1"){
						echo "<option value='1'>1</option>";
						echo "<option value='2'>2</option>";
						}else{
						echo 	"<option value='2'>2</option>";
						echo	"<option value='1'>1</option>";
						}
						echo $rows['sim'];
						?>
						</select>
						</td>
					</tr>
					<tr>
						<td>Camera:</td>
						<td><input type="text" name="camera" id="camera"class="input_text_w300_h30"></td>
					</tr>
					<tr>
						<td>Memory In:</td>
						<td><input type="text" name="memory_in" id="memory_in"class="input_text_w300_h30"></td>
					</tr>
					<tr>
						<td>Memory Out:</td>
						<td><input type="text" name="memory_out" id="memory_out"class="input_text_w300_h30"></td>
					</tr>
					<tr>
						<td>Cell:</td>
						<td><input type="text" name="cell" id="cell"class="input_text_w300_h30"></td>
					</tr>
					<tr>
						<td><input type="button" name="btn_submit" value="Add" class="btn_submit" onclick="addProductDetail();"></td>
						<td><a href="index.php"><input type="reset" name="reset" value="Cannel" class="btn_submit"></a></td>
					</tr>
				</table>
	
			<div class="clear-both"></div>
			<div class="view-content">
				<div class="loading-container">
					<span class="loading-image" id="submit-loading"></span>
				</div>
				<div class="ajax-content" id="product-div">
					<?php //Product::printProductTable();?>
				</div>			
			</div>	
			</div>
		</div>
	</div>
	<div><?php include '_footer_admin.php';?></div>
	
</body>
</html>